	<div class="modal-panel">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title">
					菜单编辑
				</h4>
			</div>
			<div class="modal-body">
			<form class="modifyform">
				<input type='hidden' name='save' value='1'>
				<input type='hidden' name='menuId'>
				<div class="line">
					<div class="left-48 input-group">
						<span class="input-group-addon">菜单名称</span>
						<input type="text" class="form-control"  placeholder="必填，15个汉字以内" name="name" rule='{"nn":1,"mn":1,"mx":15,"rv":{"pr":"admin:menu:uniqname","ef":["parentId"]}}'>
					</div>
					<div class="right-48  input-group">
						<span class="input-group-addon">上级菜单</span>
						<input type="text" class="form-control" placeholder="请从菜单树选择" id="superm" readonly name="parentN">
						<input type="hidden" name="parentId">
						<span class="input-group-addon" id="supers" ><i class="fa fa-list-ul"></i></span>
					</div>
				</div>
				<div class="line">
					<div class="left-48 input-group">
						<span class="input-group-addon">菜单URL</span>
						<input class="form-control"  name="url" rule='{"mx":64}' placeholder="64字符以内" type="text">
					</div>
					<div class="right-48  input-group">
						<span class="input-group-addon">菜单组件</span>
						<input type="text" class="form-control" rule='{"mx":64}' placeholder="64字符以内" name="component">
					</div>
				</div>
				<div class="line">
					<div class="left-48 input-group">
						<span class="input-group-addon">菜单图标</span>
						<input type="text" class="form-control" placeholder="Awesome图标选择" name="icon">
					</div>
					<div class="right-48 input-group">
						<span class="input-group-addon">菜单类型</span>
						<select class="form-control" rule='{"nn":1}' name="type"></select>
					</div>
				</div>
				<div class="line">
					<div class="left-48 input-group">
						<span class="input-group-addon">许可</span>
						<input class="form-control" rule='{"nn":1,"mn":1,"mx":16,"rv":{"pr":"admin:menu:uniqname"}}' name="permit"type="text" placeholder="64字符以内">
					</div>
					<div class="right-48 input-group">
						<span class="input-group-addon">顺序</span>
						<input type="text" class="form-control" rule='{"vt":1,"mn":0}' name="order_num" placeholder="正整数，默认为0">
					</div>
				</div>
			</form>
			</div>
			<div class="modal-footer">
				<button type="reset" class="btn btn-default">重置</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				<button type="button" class="btn btn-primary">提交</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
<script>
$(document).ready(function(){
	
	$("#superm, #supers").on('click',function(){ 
		m = getMenuByPermit('admin:menu:menuTree');
		$("#superm").popTree(m.url,'parent=1',sigleMenuTree,function(obj){
				$("#menuU input[name='parentId']").val(obj.tid);
				$("#menuU input[name='parentN']").val(obj.tname.indexOf('>')>0? obj.tname.substring(obj.tname.lastIndexOf('>')+1):obj.tname);
			});
	});

	$("#menuU button.btn-primary").on('click',function(){
		 _p = $(this).getParentTab();
		 m = getMenuByPermit('admin:menu:edit');
		 if(m){
			getData(m.url,$("#menuU .modifyform").serialize(),
			function(res){
				if(res.code==RESP_SUCCESS){
					messageBox(res.msg,'菜单修改结果',
					function(){
						$("#menuU").modal('hide');
						
						m = getMenuByPermit('admin:menu');
						getData(m.url,_p.find("div.searchbar form").serialize(),
							function(res){
								_p.fillListData(res);
							});
					});
				}else {
					messageBox(res.msg,'菜单修改结果');
				}
			});
		}
			
	});
});
</script>